1. Field of the Invention
The present invention relates to the clocking of microcontroller circuits. It applies to microcontroller chips having an internal RC oscillator to define the operating frequency of the central processing unit.
2. Description of the Related Art
Many computer systems utilize general purpose microcontrollers that are operated with various kinds of clock sources. The cheapest method is to use an internal RC oscillator as a clock source. This method is very interesting for the application developers, particularly for mass usage applications with a relatively low clock frequency, e.g. 2-5 MHz.
However, the frequency delivered by an RC oscillator source is very dependent on the operating conditions, particularly on temperature. The frequency variation range depends on the circuit design and its manufacturing process. It may be up to about ±40%.
The available solutions to adjust the internal RC oscillator are based on the internal chip design. The frequency adjustment is performed by means of a array of resistors and switches forming a digital potentiometer. A calibration value stored in a specific register determines which resistors are to be included in the resistive part of the RC circuit and controls the states of the switches accordingly. The calibration value is determined beforehand by means of an external frequency reference.
Such a solution is satisfactory, but the problem is that it is not always possible or desired to implement it.
It supposes that the microcontroller has specific EEPROM registers capable of storing a calibration value. Such registers are not available in certain technologies, such as in ROM or flash memory microcontrollers.
Even if the technology is compatible with such a solution, it remains that the array used for adjusting the oscillator frequency occupies a significant surface on the chip and thus increases the hardware cost of the product.
Accordingly, there exists a need for overcoming the disadvantages of the prior art as discussed above.